<template>
  <div class="dashboard-container">
    <component :is="currentRole" />
    
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
import three from './admin';
import one from './editor';

export default {
  name: 'Dashboard',
  components: { three, one },
  data() {
    return {
      currentRole: 'three'
    };
  },
  computed: {
    ...mapGetters(['roles'])
  },
  created() {
    // this.$router.push('/qweqwe')
    // this.$router.push('/')
    if (!this.roles.includes('one')) {
      this.currentRole = 'one';
    }

  },
  
};
</script>
